package com.ruoyi.game.websocket.message.packet;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScoreMultiplierPush {
    private int baseScore;             // 固定为 1
    private int daduMultiplier;              // 打独为 2，否则为 1
    private int fanzhuMultiplier;   // 反主加倍，例如反主后为 2
    private int shengjiMultiplier;          // 升级转换得分，1 + 升级层数
    private int finalScoreMultiplier;       // 最终倍数
    private boolean zhuangWin;          // 是否庄家胜

    public ScoreMultiplierPush(int base, int dadu, int fanzhu, int shengji, boolean zhuangWin) {
        this.baseScore = base;
        this.daduMultiplier = dadu;
        this.fanzhuMultiplier = fanzhu;
        this.shengjiMultiplier = shengji;
        this.zhuangWin = zhuangWin;
        this.finalScoreMultiplier = (shengji == -1)
                ? base * 20
                : base * dadu * fanzhu * shengji;
    }
}
